<%@ page import="com.xinjie.www.service.post.PostServiceImpl" %>
<%@ page import="com.xinjie.www.po.Post" %>
<%@ page import="java.sql.SQLException" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>点赞的帖子</title>
    <style type="text/css">
        table {
            width: 100%;
            border: 1px solid red;
            border-collapse: collapse;
        }

        th, td {
            border: 1px solid red;
        }
    </style>
</head>
<body>
<%
    int id = Integer.parseInt(request.getParameter("postId"));
    PostServiceImpl postService = new PostServiceImpl();
    Post post = null;
    try {
        post = postService.getPost(id);
    } catch (SQLException | ClassNotFoundException e) {
        e.printStackTrace();
    }
%>
<div align="center">
<table>
    <tr>
        <th>贴子id</th>
        <th>主题</th>
        <th>所属贴吧</th>
        <th>内容</th>
        <th>作者</th>
        <th>评论数</th>
        <th>点赞数</th>
        <th>发布时间</th>
    </tr>
    <tr>
        <%= "<td>" + post.getPostId() + "</td>"%>
        <%="<td>" + post.getTitle() + "</td>"%>
        <%="<td>" + post.getTieba() + "</td>"%>
        <%="<td>" + post.getContent() + "</td>"%>
        <%="<td>" + post.getWriter() + "</td>"%>
        <%="<td>" + post.getComment() + "</td>"%>
        <%="<td>" + post.getThumb() + "</td>"%>
        <%="<td>" + post.getTime() + "</td>"%>
    </tr>
</table>
<a href="ThumbList.jsp">返回</a>
</div>
</body>
</html>
